const { sqlQuery } = require('../db/mysql')
const loginCheck = async (u, p) => {
  let sql = `select * from user where userName='${u}' and password=${p}`
  const res = await sqlQuery(sql)
  if (res.length > 0) {
    return new SuccessModel(res[0], '登录成功')
  } else false
}
module.exports = loginCheck
